import * as React from 'react';

export interface HelloProps{
  compiler : string;
  framework : string;
}

// export const Hello = ( props : HelloProps ) => <h1>hello from { props.compiler } and { props.framework }</h1>

/* 
  无状态的功能组件
  'HelloProps' 描述props的类型
  'undefined' 不设置state，所以采用'未定义'类型
*/ 
export class Hello extends React.Component<HelloProps,undefined>{
  render(){
    const { compiler , framework } = this.props;
    return (
      <h1>hello from { compiler } and { framework } !</h1>
    )
  }
}